package domain;

import java.sql.Timestamp;
import java.util.*;

import util.Title;
import util.TitleUtil;

public class CrewJob {

	private long cjid;
	private long uid;
	private long mid;
	private long crewtitle;
	private String description;
	private Timestamp timestamp;
	private int count;

	private Map<User,Integer> applied;

	public CrewJob(long cjid, long uid, long mid, long crewtitle,
			String description, Timestamp timestamp, int count) {
		this.cjid = cjid;
		this.uid = uid;
		this.mid = mid;
		this.crewtitle = crewtitle;
		this.description = description;
		this.timestamp = timestamp;
		this.setCount(count);
	}

	public  Map<User,Integer> getApplied() {
		return applied;
	}

	public void setApplied( Map<User,Integer> applied) {
		this.applied = applied;
	}

	public long getCjid() {
		return cjid;
	}

	public void setCjid(long cjid) {
		this.cjid = cjid;
	}

	public long getUid() {
		return uid;
	}

	public void setUid(long uid) {
		this.uid = uid;
	}

	public long getMid() {
		return mid;
	}

	public void setMid(long mid) {
		this.mid = mid;
	}

	public long getCrewtitle() {
		return crewtitle;
	}

	public Title getTitle() {
		return TitleUtil.getTitleByTitleBit(crewtitle);
	}

	public void setCrewtitle(long crewtitle) {
		this.crewtitle = crewtitle;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Timestamp getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Timestamp timestamp) {
		this.timestamp = timestamp;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}
}
